package com.ffmpeg;

import java.io.File;
import java.io.IOException;

/**
 * @author xurongbei
 */
public class Convert {

    public static void main(String[] args) throws Exception {
        String inputFile = "E:\\privateGit\\springboot\\audio.wav";
        String outputFile = "E:\\privateGit\\springboot\\xrb.mp3";
        //test(inputFile,outputFile);
        String s = "111";
        Object o = "111";
        System.out.println(s.equals(o));
    }

    public static void test(String srcPath,String destPath) throws Exception{

        String command = "ffmpeg -i "+srcPath+" -acodec libmp3lame "+destPath;

        Process process = Runtime.getRuntime().exec(command);

        int exitCode = process.waitFor();
        if (exitCode != 0) {
            throw new RuntimeException("FFmpeg failed with error code: " + exitCode);
        }
    }

}
